Add repeatable marketing screenshot generation - #4508
Draft
shaunandrews wants to merge 8 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
How AI was used in this PR
This proof of concept was designed, implemented, exercised, and documented with Codex. Human
direction established the marketing goals and corrected the key fidelity requirements: a populated
demo portfolio, narrow chat and wide preview layouts, controllable panels and composers, real
WordPress/phpMyAdmin surfaces, and saved screenshots that match the visible Electron window.
Codex inspected the Agentic UI and Studio CLI, built both capture tiers, created the isolated-site
harness, ran the complete catalog and annotation flows in light and dark, visually reviewed the
outputs, and prepared this review guide. Reviewers should validate the architecture, scenario
content, privacy boundary, and visual choices rather than treating an AI-assisted proof of concept
as merge-ready by default.
Executive summary
This draft adds a repeatable system for generating Studio Agentic UI screenshots for landing pages,
documentation, app stores, Pressable, Automattic for Agencies, and similar marketing surfaces.
There is now one demo site: a checked-in Meridian Coffee WordPress block theme installed into a
fresh temporary Studio site for every run. There is no static frontend replacement. The two capture
tiers differ only in how Studio is hosted:
Studio scenario data. Preview-capable scenarios load the real WordPress site through Studio's
normal
<iframe>fallback.real
<webview>and exercises the actual annotation inspector, WP Admin, and phpMyAdmin.Both tiers write exact-size PNGs, a manifest, and a standalone contact sheet into ignored artifact
directories. Electron output uses
BrowserWindow.webContents.capturePage()because a Playwrighthost-page screenshot can mis-scale or crop the separately composited
<webview>even while thevisible window is correct.
Example output
Complete renderer catalog — real WordPress preview
Twenty 2880 × 1800 captures cover all ten scenarios in light and dark. Every visible Meridian
preview in this sheet came from the same isolated WordPress block theme used by Electron.
Real WordPress annotation flow
Annotation draft · light
The real inspector is attached to the real WordPress theme heading.
Annotation submitted · dark
The annotation crosses the guest/host bridge and appears in the Studio conversation.
WordPress tab · real WP 7.0.4
The runner asserts the genuine
wp-adminDOM before saving the PNG.Database tab · real phpMyAdmin
The runner asserts phpMyAdmin and shows the temporary site's actual
wp_*tables.Proposed Changes
controllable sizes, themes, panel layouts, composer states, and conversation positions.
captures so the demo design cannot drift between two implementations.
deterministic without reading personal Studio data or invoking a live model.
Electron window.
Fit-pane guest/host geometry, frontend overflow, and genuine WP Admin/phpMyAdmin DOM markers.
Agent-first workflow
The intended workflow is for a marketer or engineer to describe the required compositions and let
an agent perform checkout, build, capture, inspection, iteration, and handoff.
A useful prompt is:
The agent should:
contact-sheet.htmland inspect the full-size PNGs in both themes.screenshot or create replacement site/admin/database HTML.
Checkout, build, and use
Generate the default browser-renderer set:
Generate the complete wide renderer catalog:
Generate the real annotation flow:
Repeat with
--theme darkfor the paired dark set. Once both builds are current, use thecorresponding
:capturecommand for faster iteration. Each invocation still creates and destroys afresh real WordPress site.
How it works
and activates the checked-in Meridian Marketing block theme.
pointing its selected site at the temporary WordPress origin.
annotation/admin/database states through the real webview.
composed-window capture for correct guest pixels.
isolated daemon and removes the temporary site and configuration.
Review guide
Please review carefully:
workflow.
while the selected site itself remains real.
for every preview capture.
capturePage()rule and DOM/geometry assertions adequately prevent recurrence of thescaled/cropped Electron output.
Okay to skim
Known tradeoffs and follow-ups
prove a packaged app's external OS shadow/chrome. Matching Windows and Linux hosts remain separate
fidelity work.
deterministic scenario data, and no live model run occurs.
second demo implementation and keeps all publishable preview pixels honest.
ignorepackagetype mismatch in
apps/studio/src/ipc-handlers.ts; the affected focused typechecks pass.Safety checklist
~/Studiosite is read.Testing Instructions
Focused validation completed:
Results:
both Studio themes.
sheet.
state, genuine WordPress 7.0.4 WP Admin, genuine phpMyAdmin tables, and both Studio themes.
Pre-merge Checklist
readiness, and PNG-dimension errors.
ignorepackage type mismatch.